<?php

namespace App\Validate;

use App\Validate\BaseValidate;

class ResourceTotalAccessNumUserValidate extends  BaseValidate
{
    //验证规则
    protected $rule = [
        'id' => 'bail|required|integer',
        'ids' => 'bail|required',


        'resource_business_id' => 'bail|required|integer',
        'resource_guid' => 'bail|required|size:32',

    ];
    //自定义验证信息
    protected $message = [
        'id.required' => 'ID不能为空',
        'id.integer' => 'ID格式不正确',
        'ids.required' => 'ID不能为空',

        'resource_business_id.required' => '资源商ID不能为空',
        'resource_business_id.integer' => '资源商ID格式不正确',
        'resource_guid.required' => 'ID不能为空',
        'resource_guid.size' => 'ID格式不正确',
    ];


    //自定义场景
    protected $scene = [
        'add' => ['resource_guid'], //添加用户访问资源记录
        'del' => ['ids'], //删除用户访问资源记录


    ];
}
